package test;

import entity.Course;
import entity.Student;
import entity.Teacher;

public class test {
    public static void main(String[] args) {
        // 1. 创建教师对象
        Teacher t1 = new Teacher("T001", "张三", "男", null);
        Teacher t2 = new Teacher("T002", "李四", "女", null);

        // 2. 创建课程对象并关联教师
        Course c1 = new Course("C001", "Java程序设计", "教学楼A301", "周一上午1-2节", t1);
        Course c2 = new Course("C002", "数据库原理", "实验楼B205", "周三下午3-4节", t2);

        // 3. 给教师关联课程
        t1 = new Teacher("T001", "张三", "男", c1);
        t2 = new Teacher("T002", "李四", "女", c2);

        // 4. 教师开课&打印课表
        t1.openCourse();
        t1.printSchedule();
        t2.openCourse();
        t2.printSchedule();

        // 5. 学生选课&打印课表
        Student s1 = new Student("S001", "王五", "男");
        s1.selectCourse(c1);
        s1.printSchedule();
        s1.dropCourse();
        s1.printSchedule();
    }
}